home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / UTILITY1 / FDUMP102.ZIP / FD-SWARE.FRM < prev    next >
Text File  |  1993-10-12  |  10KB  |  293 lines

  1. VERSION 2.00
  2. Begin Form Form_xWare 
  3.    BackColor       =   &H00FFFF80&
  4.    ClientHeight    =   2925
  5.    ClientLeft      =   1020
  6.    ClientTop       =   1425
  7.    ClientWidth     =   7305
  8.    Height          =   3330
  9.    Icon            =   FD-SWARE.FRX:0000
  10.    Left            =   960
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   2925
  14.    ScaleWidth      =   7305
  15.    Top             =   1080
  16.    Width           =   7425
  17.    Begin CommandButton Command3 
  18.       Caption         =   "Disagree"
  19.       Height          =   375
  20.       Left            =   4200
  21.       TabIndex        =   2
  22.       Top             =   2400
  23.       Width           =   975
  24.    End
  25.    Begin CommonDialog CMDialog1 
  26.       DefaultExt      =   "reg"
  27.       Filter          =   "*.reg"
  28.       FontName        =   "Courier New"
  29.       FontSize        =   10
  30.       InitDir         =   "C:\"
  31.       Left            =   840
  32.       Top             =   2280
  33.    End
  34.    Begin CommandButton Command2 
  35.       Caption         =   "Print"
  36.       Height          =   495
  37.       Left            =   6000
  38.       TabIndex        =   1
  39.       Top             =   2280
  40.       Width           =   975
  41.    End
  42.    Begin CommandButton Command1 
  43.       Caption         =   "Agree"
  44.       Height          =   375
  45.       Left            =   3000
  46.       TabIndex        =   3
  47.       Top             =   2400
  48.       Width           =   975
  49.    End
  50.    Begin Timer Timer1 
  51.       Interval        =   250
  52.       Left            =   240
  53.       Top             =   2280
  54.    End
  55.    Begin TextBox Text2 
  56.       BackColor       =   &H00FFFF80&
  57.       BorderStyle     =   0  'None
  58.       Enabled         =   0   'False
  59.       Height          =   495
  60.       Left            =   120
  61.       MultiLine       =   -1  'True
  62.       TabIndex        =   4
  63.       TabStop         =   0   'False
  64.       Text            =   "Registered users will receive a serial-numbered copy of the latest version of the program and will be notified of future revisions as they become available."
  65.       Top             =   1560
  66.       Width           =   7095
  67.    End
  68.    Begin TextBox Text1 
  69.       Alignment       =   2  'Center
  70.       BackColor       =   &H00FFFF80&
  71.       BorderStyle     =   0  'None
  72.       Enabled         =   0   'False
  73.       Height          =   615
  74.       Left            =   120
  75.       MultiLine       =   -1  'True
  76.       TabIndex        =   5
  77.       TabStop         =   0   'False
  78.       Text            =   "If you use this program beyond the 21 day trial period, please register.  Press 'PRINT' to produce a registration form."
  79.       Top             =   840
  80.       Width           =   7095
  81.    End
  82.    Begin Label Label1 
  83.       Alignment       =   2  'Center
  84.       BackColor       =   &H00FFFF80&
  85.       Caption         =   "ShareWare"
  86.       FontBold        =   -1  'True
  87.       FontItalic      =   -1  'True
  88.       FontName        =   "MS Sans Serif"
  89.       FontSize        =   18
  90.       FontStrikethru  =   0   'False
  91.       FontUnderline   =   0   'False
  92.       ForeColor       =   &H000000FF&
  93.       Height          =   495
  94.       Left            =   120
  95.       TabIndex        =   0
  96.       Top             =   120
  97.       Width           =   7095
  98.    End
  99. End
  100. Option Explicit
  101. '
  102. ' Declare Form-wide Variables
  103. '
  104. Dim smFormLines(50) As String
  105. Dim iFormNoLines As Integer
  106.  
  107. '------------------------------------------------
  108. ' Process 'Agree' Button Click Event
  109. '------------------------------------------------
  110. Sub Command1_Click ()
  111.   '
  112.   Timer1.Enabled = False
  113.   If igFromForm = 2 Then
  114.     ' Return to 'About' Form
  115.     Form_About.Enabled = True
  116.     Form_xWare.Visible = False
  117.     Form_About.Visible = True
  118.     Unload Form_xWare
  119.   End If
  120.   '
  121.   If igFromForm = 1 Then
  122.     ' Return to 'Main' Form
  123.     Form_Main.Enabled = True
  124.     Form_xWare.Visible = False
  125.     Form_Main.Visible = True
  126.     Unload Form_xWare
  127.   End If
  128.   '
  129.   If igFromForm = 3 Then
  130.     ' Final Commercial, Don't return
  131.     Form_xWare.Visible = False
  132.     Unload Form_xWare
  133.     End
  134.   End If
  135.  
  136. End Sub
  137.  
  138. '------------------------------------------------
  139. ' Process 'Print' Button Click Event
  140. '------------------------------------------------
  141. Sub Command2_Click ()
  142.   '
  143.   Dim sRegisterFileName As String
  144.   Dim iWork1 As Integer
  145.   '
  146.   Call LoadFormLines
  147.   '
  148.   On Error GoTo FormErr
  149.   '
  150.   '' Specify Print Action
  151.   CMDialog1.CancelError = True
  152.   CMDialog1.Flags = PD_NOPAGENUMS
  153.   CMDialog1.DialogTitle = sgProgramName & " Print Form"
  154.     'TRIGGERS API Print Dialog
  155.   CMDialog1.Action = DLG_PRINT
  156.   '
  157.   If (CMDialog1.Flags And PD_PRINTTOFILE) > 0 Then
  158.     '' Specify File to Print to
  159.     CMDialog1.Flags = OFN_NOREADONLYRETURN Or OFN_PATHMUSTEXIST Or OFN_HIDEREADONLY Or OFN_OVERWRITEPROMPT
  160.     CMDialog1.DialogTitle = sgProgramName & " Print Form to File"
  161.     CMDialog1.Filename = sgProgramName & ".REG"
  162.       'TRIGGERS API Print-to-File Dialog
  163.     CMDialog1.Action = DLG_FILE_SAVE
  164.     '
  165.     sRegisterFileName = CMDialog1.Filename
  166.     On Error GoTo 0
  167.     ' Open Save File
  168.     Open sRegisterFileName For Output As #2
  169.     '
  170.     ' Print to Save File
  171.     '
  172.     Form_xWare.MousePointer = HOURGLASS
  173.     '
  174.     For iWork1 = 1 To iFormNoLines
  175.       Print #2, smFormLines(iWork1)
  176.     Next iWork1
  177.     '
  178.     Close #2
  179.     ' Save File is Complete
  180.     '
  181.   Else
  182.     '
  183.     ' Print to Printer
  184.     '
  185.     On Error GoTo 0
  186.     Form_xWare.MousePointer = HOURGLASS
  187.     '
  188.     For iWork1 = 1 To iFormNoLines
  189.       printer.Print smFormLines(iWork1)
  190.     Next iWork1
  191.     '
  192.     printer.EndDoc
  193.     ' Print to Printer is Complete
  194.     '
  195.   End If
  196.   '
  197.   Form_xWare.MousePointer = DEFAULT
  198.   Command1.SetFocus
  199.   '
  200.   Exit Sub
  201. '
  202. FormErr:
  203.   ' User cancelled Dialog
  204.   Exit Sub
  205.  
  206. End Sub
  207.  
  208. Sub Command3_Click ()
  209.   '
  210.   End
  211.  
  212. End Sub
  213.  
  214. '------------------------------------------------
  215. ' Process Form_Load Event
  216. '------------------------------------------------
  217. Sub Form_Load ()
  218.   '
  219.   Form_xWare.Caption = sgProgramName & " Commercial"
  220.   Timer1.Enabled = True
  221.   Label1.Visible = True
  222.  
  223. End Sub
  224.  
  225. '------------------------------------------------
  226. ' Subroutine to Load sFormLines & Set iFormNoLines
  227. '------------------------------------------------
  228. Sub LoadFormLines ()
  229.   '
  230.   smFormLines(1) = "                               " & sgProgramName
  231.   smFormLines(2) = " "
  232.   smFormLines(3) = "        Please remit to:            TecLogic, Inc."
  233.   smFormLines(4) = "                                    1004 Cooper Court"
  234.   smFormLines(5) = "                                    Buffalo Grove, IL  60089-1217"
  235.   smFormLines(6) = "                                    Compuserve ID: " & sgCompuserveID
  236.   smFormLines(7) = " "
  237.   smFormLines(8) = "                          LIMIT OF LIABILITY"
  238.   smFormLines(9) = " "
  239.   smFormLines(10) = "      " & sgProgramName & " is distributed as is.  The author disclaims all warranties,"
  240.   smFormLines(11) = "      expressed or implied.  The author will assume no liability for"
  241.   smFormLines(12) = "      damages either from the direct use of this product or as a"
  242.   smFormLines(13) = "      consequence of the use of this product."
  243.   smFormLines(14) = " "
  244.   smFormLines(15) = "      Please register one copy of " & sgProgramName & " for each user at your site."
  245.   smFormLines(16) = " "
  246.   smFormLines(17) = "       " & sgProgramName & " Registration  Qty. _____ (1-10)    @ $9.95 ea. = ___________"
  247.   smFormLines(18) = "                              Qty. _____ (11-100)  @ $7.95 ea. = ___________"
  248.   smFormLines(19) = "                              Qty. _____ (101+)    @ $890.00   = ___________"
  249.   smFormLines(20) = " "
  250.   smFormLines(21) = "                       Total  Qty. _____                         ___________"
  251.   smFormLines(22) = "                                    (Quantity pricing is per site)"
  252.   smFormLines(23) = " "
  253.   smFormLines(24) = " "
  254.   smFormLines(25) = "      PAYMENT MUST BE IN US DOLLARS OR YOUR ORDER CAN NOT BE PROCESSED"
  255.   smFormLines(26) = "      **********     MAKE PAYABLE TO: TecLogic, Inc.     **********"
  256.   smFormLines(27) = " "
  257.   smFormLines(28) = "      *Allow 2 - 3 w